package org.van.carfi.common.kernel.utils;
import com.google.gson.Gson;

import java.lang.reflect.Type;
import java.util.Map;

public class GsonUtils {
    private static final Gson gson = new Gson();

    public static Map<String, String> getMapFromJson(String json, Type typeOfT){
        return gson.fromJson(json, typeOfT);
    }

    public static String toJsonString(Object object) {
        return object == null ? null : gson.toJson(object);
    }
}
